#include<stdio.h>
//把原字符串复制num个字母到目标字符串,从目标字符串的开头进行复制
char *mymemcpy(char *arr1,const char* arr2,size_t num)
{
    char *ret=arr1;
    while(num--)
    {
        *arr1=*arr2;
        arr1=arr1+1;
        arr2=arr2+1;
    }
    return ret;
}
int main()
{
    char arr1[]="hello world";
    char arr2[]="xxxxxxx";
    int num=7;
    char *target=mymemcpy(arr1,arr2,num);
    printf("%s",target);
    return 0;
}